package com.dlc.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dlc.shop.bean.model.ProdExtension;
import com.dlc.shop.bean.model.SkuStockLock;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 *
 * @author LGH
 * @date 2022-05-05 10:47:48
 */
public interface ProdExtensionMapper extends BaseMapper<ProdExtension> {

    /**
     * 更新注水销量
     *
     * @param waterSaleNum
     * @param prodId
     * @return
     */
    int updateWaterSoldNum(@Param("waterSoldNum") Integer waterSaleNum, @Param("prodId") Long prodId);

    /**
     * 根据商品Id计算总销量
     * @param prodIdList 商品Id列表
     * @return
     */
    Long getSoldNumByProdIds(@Param("prodIdList") List<Long> prodIdList);
}
